home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15173 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  887 b 

  1. Path: news.nask.org.pl!usenet
  2. From: flssoft@blue.maloka.waw.pl (Grzegorz (FLS))
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: fast find algoritm?
  5. Date: Wed, 03 Apr 1996 20:23:42 GMT
  6. Organization: Research and Academic Computer Network
  7. Message-ID: <4juj1r$kt8@bilbo.nask.org.pl>
  8. References: <Dp8wE7.8E3@cix.compulink.co.uk>
  9. NNTP-Posting-Host: s114.maloka.waw.pl
  10. X-Newsreader: Forte Free Agent v0.46
  11.  
  12. setheridge@cix.compulink.co.uk ("Stephen Etheridge") wrote:
  13.  
  14. >Does anyone have an search algoritm faster than a binary chop for the 
  15. >following:
  16.  
  17. >find a date from a sorted array of 1500 possible storage locations
  18.  
  19. Hi Steve,
  20.  
  21. Yes, there is an algorithm with cost O(1). Use a hash-table. If you
  22. use a good hash-function, you will have a fastest algorithm.
  23.  
  24. Regards,
  25. Grzegorz.
  26.  
  27. Grzegorz
  28.  
  29. ``````````````````````````` Grzes vel Pysiak
  30. Ablue, pecte canem, canis est et permanet idem.
  31. Desunt cetera!
  32.  
  33.